module KnowledgeMappingDefinition
  extend ActiveSupport::Concern

  included do
    mapping do
      indexes :project_id, index: 'no'
      indexes :phrase, index: 'not_analyzed', boost: 100
      indexes :meaning, analyzer: 'ik_max_word'
      indexes :created_at, type: 'date', index: 'no', format: 'strict_date_optional_time||epoch_millis'
      indexes :updated_at, type: 'date', index: 'no', format: 'strict_date_optional_time||epoch_millis'
    end
  end
end